#ifndef TESTENGINE_H
#define TESTENGINE_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>

#include "scatu/utils.h"

class CTestEngine : public CBase
    {
public:
    ~CTestEngine();
    static CTestEngine* NewL();
    static CTestEngine* NewLC();

private:
    CTestEngine();
    void ConstructL();
    
public:
    
    TInt Sum(TInt aA, TInt aB) { return aA + aB; }
    
    HBufC * ConcatenateL(TDesC const & aFirst, TDesC const & aSecond);
    void ConcatenateAsyncL(scatu::MFunctor<HBufC *> & aRetFunc, TDesC const & aFirst, TDesC const & aSecond);
    
private:
    
    static TInt ConcatenateCallback(TAny * aThis); 
    
    HBufC * iConcatenateResult;
    scatu::MFunctor<HBufC *> * iConcatenateFunctor;
    
    CPeriodic * iPeriodic;
    };

#endif // TESTENGINE_H
